import axios from '@/libs/request/axios'
import QS from 'qs';
//还款日变更列表查询
export const getRepaymentChangeList = (params) => {
    return axios.request({
        url: '/contractManage/repaymentChange/getManageRepaymentChangeList',
        method: 'post',
        data: params,
    })
}

// 还款日变更页面数据查询（新增）
export const queryBusinessHandle = (contractNo) => {
    return axios.request({
        url: '/contractBasic/repaymentDateChange/queryBusinessHandle',
        data: QS.stringify({contractNo:contractNo},{arrayFormat: 'repeat'}),
        method: 'post',
        headers: { 'content-type': 'application/x-www-form-urlencoded' },
    })
}

// 还款日变更页面数据查询(查看、编辑)
export const viewOrEdit = (contractNo,caseNo) => {
    return axios.request({
        url: '/contractManage/repaymentChange/findPoundageByContractNo',
        data: QS.stringify({contractNo:contractNo,caseNo:caseNo},{arrayFormat: 'repeat'}),
        method: 'post',
        headers: { 'content-type': 'application/x-www-form-urlencoded' },
    })
}
// 还款日变更提交
export const submitChange = (params) => {
    return axios.request({
        url: '/contractManage/repaymentChange/submitChange',
        data: params,
        method: 'post',
    })
}
// 查询手机号
export const queryPhone = (contractNo) => {
    return axios.request({
        url: '/contractBasic/repaymentDateChange/queryPhone',
        data: QS.stringify({contractNo:contractNo}),
        method: 'post',
        headers: { 'content-type': 'application/x-www-form-urlencoded' },
    })
}

// 短信发送
export const sendMessageInfo = (params) => {
    return axios.request({
        url: '/contractManage/smsTemplate/sendMessageInfo',
        data: params,
        method: 'post',
    })
}
